import request from '@/config/axios'

//获取报表管理数据对象
export const reportManageDataObject = async () => {
  return await request.get({
    url: '/amp/report-manage/dataObject'
  })
}
//获取报表管理视图
export const reportManageView = async () => {
  return await request.get({
    url: '/amp/report-manage/view'
  })
}
//创建报表管理
export const reportManageCreate = async (data) => {
  return await request.post({
    url: '/amp/report-manage/create',
    data
  })
}
//删除报表管理
export const reportManageDel = async (id) => {
  return await request.delete({
    url: '/amp/report-manage/delete?id=' + id
  })
}
//获得报表管理
export const reportManageGet = async (params) => {
  return await request.get({
    url: '/amp/report-manage/get',
    params
  })
}
// 获得报表管理分页
export const reportManagePage = async (params) => {
  return await request.getOriginal({
    url: '/amp/report-manage/page',
    params
  })
}
// 更新报表管理
export const reportManageUpdate = async (data) => {
  return await request.put({
    url: '/amp/report-manage/update',
    data
  })
}
// 获得报表展示
export const reportManageGetShow = async () => {
  return await request.get({
    url: '/amp/report-manage/getShow'
  })
}
// 获得首页报表信息
export const reportManageGetHome = async () => {
  return await request.get({
    url: '/amp/report-manage/getHome'
  })
}
// 获得报表展示
export const reportManageGetHomePage = async (params) => {
  return await request.get({
    url: '/amp/report-manage/getHomePage',
    params
  })
}
// 获得报表状态修改
export const reportManageOpen = async (id) => {
  return await request.post({
    url: '/amp/report-manage/open?id=' + id
  })
}
// 获得报表首页状态
export const reportManageOpenHomePage = async (id) => {
  return await request.post({
    url: '/amp/report-manage/openHomePage?id=' + id
  })
}
// 报表导出excel
export const reportManageReport = async (data) => {
  return await request.downloadPost({
    url: '/amp/report-manage/report',
    data
  })
}
// 报表展示
export const reportManageShow = async (params) => {
  return await request.get({
    url: '/amp/report-manage/reportPage',
    params,
    timeOut: 60000
  })
}

// 首页报表展示
export const reportManageHomeReport = async (params) => {
  return await request.get({
    url: '/amp/report-manage/homeReport',
    params
  })
}
